package com.mnsq.comment.bean.entity;

import com.mnsq.comment.bean.base.BaseEntity;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * @author Administrator
 * @date 2019/3/27 0027
 */
@Data
@MappedSuperclass
public class BaseInfoEntity extends BaseEntity {
    /**
     * 目标对象的主键id
     */
    @Column(name = "target_id", nullable = false)
    private Long targetId;
    /**
     * 父评论的id（可为空）
     */
    @Column(name = "parent_id")
    private Long parentId;
    @Column(columnDefinition = "text not null")
    private String content;

    /**
     * 投诉数量
     */
    private Integer hate;
    /**
     * 点赞数量
     */
    private Integer good;
    /**
     * 踩数量
     */
    private Integer bad;
    /**
     * 评论用户主键id
     */
    @Column(name = "user_id", nullable = false)
    private Long userId;
}
